package com.yuerlive.paperplane.timeline;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.yuerlive.paperplane.R;

import java.util.Calendar;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * Created by Admin on 2017/10/12.
 */

public class DoubanMomentFragment extends Fragment {
    @BindView(R.id.recychler_view)
    RecyclerView recychlerView;
    @BindView(R.id.empty_view)
    LinearLayout emptyView;
    @BindView(R.id.refresh_layout)
    SwipeRefreshLayout refreshLayout;
    private int mYear,mMonth,mDay;
    private LinearLayoutManager layoutManager;
    private FloatingActionButton fab;

    public static DoubanMomentFragment newInstance() {
        return new DoubanMomentFragment();
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
      mYear= Calendar.getInstance().get(Calendar.YEAR);
        mMonth =Calendar.getInstance().get(Calendar.MONTH);
        mDay =Calendar.getInstance().get(Calendar.DAY_OF_MONTH);

    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_timeline_page, container, false);
        ButterKnife.bind(this, view);
        refreshLayout.setColorSchemeColors(ContextCompat.getColor(getContext(), R.color.colorAccent));
        layoutManager=new LinearLayoutManager(getContext());
        recychlerView.setLayoutManager(layoutManager);
        fab=(FloatingActionButton)getActivity().findViewById(R.id.fab);

        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
    }
}
